package vip.xiaonuo.smzq.modular.lifecycle.service.entity.impl;

import  java.util.List;
import java.util.Map;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.map.MapUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.smzq.modular.lifecycle.entity.PsbaGtWjglb;
import vip.xiaonuo.smzq.modular.lifecycle.mapper.entity.PsbaGtWjglbMapper;
import vip.xiaonuo.smzq.modular.lifecycle.service.entity.PsbaGtWjglbService;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * <p>
 * 评审备案-文件关联表 服务实现类
 * </p>
 *
 * @author 于彦飞
 * @since 2024-07-22
 */
@Service
public class PsbaGtWjglbServiceImpl extends ServiceImpl<PsbaGtWjglbMapper, PsbaGtWjglb> implements PsbaGtWjglbService {
        @Autowired
        private PsbaGtWjglbMapper psbaGtWjglbMapper;



        @Override
        public List<PsbaGtWjglb>  queryPsbaGtWjglbList(PsbaGtWjglb psbaGtWjglb){
            List<PsbaGtWjglb> list = new LambdaQueryChainWrapper<PsbaGtWjglb>(psbaGtWjglbMapper).setEntity(psbaGtWjglb)
            .list();
            return list;
        }

        @Override
        public IPage<PsbaGtWjglb> queryPsbaGtWjglbListPage(PsbaGtWjglb psbaGtWjglb){
            IPage<PsbaGtWjglb> iPage = new LambdaQueryChainWrapper<PsbaGtWjglb>(psbaGtWjglbMapper).setEntity(psbaGtWjglb)
            .page(new Page<>(psbaGtWjglb.getCurrentPageNum(),psbaGtWjglb.getPageSize()));

            List<PsbaGtWjglb> records = iPage.getRecords();
            iPage.setRecords(records);
            return iPage;
        }


    @Override
    public boolean delPsbaGtWjglb(String id){
        return this.removeById(id);
    }
    @Override
    public boolean delPsbaGtWjglbBatch(List<String> ids){
        return this.removeByIds(ids);
    }

}

